package com.ys.entity.mail;

import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="MAIL_Main", catalog="Id")
public class MailMain extends BaseEntity<MailMain> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="Title", nameJava="title", typeDataBase="varchar")
	private String title;
	@YsField(nameDataBase="Emergent", nameJava="emergent", typeDataBase="tinyint")
	private Integer emergent;
	@YsField(nameDataBase="Detail", nameJava="detail", typeDataBase="text")
	private String detail;
	@YsField(nameDataBase="ExtraFile", nameJava="extraFile", typeDataBase="varchar")
	private String extraFile;
	@YsField(nameDataBase="CreateChangeId", nameJava="createChangeId", typeDataBase="bigint")
	private Long createChangeId;
	@YsField(nameDataBase="Receivers", nameJava="receivers", typeDataBase="varchar")
	private String receivers;
	@YsField(nameDataBase="Copyers", nameJava="copyers", typeDataBase="varchar")
	private String copyers;
	@YsField(nameDataBase="Tags", nameJava="tags", typeDataBase="varchar")
	private String tags;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public MailMain setId(Long id) {
		this.id = id;
		return this;
	}
	public String getTitle() {
		return title;
	}
	public MailMain setTitle(String title) {
		this.title = title;
		return this;
	}
	public Integer getEmergent() {
		return emergent;
	}
	public MailMain setEmergent(Integer emergent) {
		this.emergent = emergent;
		return this;
	}
	public String getDetail() {
		return detail;
	}
	public MailMain setDetail(String detail) {
		this.detail = detail;
		return this;
	}
	public String getExtraFile() {
		return extraFile;
	}
	public MailMain setExtraFile(String extraFile) {
		this.extraFile = extraFile;
		return this;
	}
	public Long getCreateChangeId() {
		return createChangeId;
	}
	public MailMain setCreateChangeId(Long createChangeId) {
		this.createChangeId = createChangeId;
		return this;
	}
	public String getReceivers() {
		return receivers;
	}
	public MailMain setReceivers(String receivers) {
		this.receivers = receivers;
		return this;
	}
	public String getCopyers() {
		return copyers;
	}
	public MailMain setCopyers(String copyers) {
		this.copyers = copyers;
		return this;
	}
	public String getTags() {
		return tags;
	}
	public MailMain setTags(String tags) {
		this.tags = tags;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public MailMain setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public MailMain setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public MailMain setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static MailMain mailMain(
		String title,
		Integer emergent,
		String detail,
		String extraFile,
		Long createChangeId,
		String receivers,
		String copyers,
		String tags,
		Integer status
			) {
		MailMain entity = new MailMain();
		entity.setTitle(title);
		entity.setEmergent(emergent);
		entity.setDetail(detail);
		entity.setExtraFile(extraFile);
		entity.setCreateChangeId(createChangeId);
		entity.setReceivers(receivers);
		entity.setCopyers(copyers);
		entity.setTags(tags);
		entity.setStatus(status);
		return entity;
	}
}